package com.xique.job.task;

import com.xique.park.api.RemoteParkOnService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 删除在场记录的定时任务
 *
 * @author WLD
 */
@Slf4j
@RequiredArgsConstructor
@Component
public class DeleteOnTask {

    private final RemoteParkOnService remoteParkOnService;

    /**
     * 定时删除在场记录
     */
    public void timingDelete() {
        log.info("[定时任务]-定时删除在场记录");
        long startTime = System.currentTimeMillis();
        remoteParkOnService.timingDelete();
        log.info("[定时任务]-定时删除在场记录执行时间：{}", System.currentTimeMillis() - startTime);
    }

}
